from microblog.jobs.models import *
from django.contrib import admin

class WorkAdmin(admin.ModelAdmin):
  def save_model(self, request, obj, form, change):
        project = obj.Project
        print request.POST['State']
       # if obj.State and (obj.State <> request.State):
           # if not obj.Project.State:
         #       project.State = '1'
         #       project.save()
         #       print "nihao"
        return super(WorkAdmin,self).save_model(request, obj, form, change)
admin.site.register(Project)
admin.site.register(Work,WorkAdmin)
admin.site.register(Plan)
admin.site.register(Person_Work)
admin.site.register(Self_Plan)
admin.site.register(Task)
